from django.urls import converters

class UsernameConvertier:
    regex = "[a-zA-z0-9_-]{5,20}"

    def to_python(self, value):
        return value

class MobileConvertier:
    regex = "1[3-9]\d{9}"

    def to_python(self, value):
        return value